﻿using System.Collections.Generic;
using System.Linq;
using Shell.DomainDot;
using Framework.Poco;

namespace Framework.Domain
{
    /// <summary>
    /// 选择所有经销商分组
    /// </summary>
    public class SelectAgencyGroup : DomainDotBase
    {
        /// <summary>
        /// 获取或设置所有经销商分组
        /// </summary>
        public WithAll<AgencyGroup> AgencyGroup { private get; set; }

        /// <summary>
        /// 获取所有经销商分组
        /// </summary>
        public IEnumerable<AgencyGroup> GetAllAgencyGroup()
        {
            return this.AgencyGroup.OrderByDescending(r => r.Rank);
        }
    }
}
